export const serverUrl = 'http://111.231.242.254:8080/jwt/';
// export const serverUrl = 'http://localhost:8888/';
// export const payUrl='http://132.147.234.75:8089/LJYZT/restful/trans_class/scanPay/getQRCode?data=';
export const payUrl='http://192.168.1.120:8089/LJYZT/restful/trans_class/scanPay/getQRCode?data=';

export const AppUrl = {
  auth: {
    login: serverUrl + 'auth',
    userId: serverUrl + 'user',
    refresh: serverUrl + 'refresh',
    logout: serverUrl + 'logout',
    rId:serverUrl + 'rId'
  },
  image: {
    type: { //图片类型管理
      user: 0,
      food: 1,
      restaurant: 2
    },
    getImage: serverUrl + 'image/getImage/',           //根据type和belong获取图片
    getById: serverUrl + 'image/getById/',             //根据imgId获取图片
    getTableQrCode: serverUrl + 'image/getTableCode',  //获取桌面二维码
    getPayQrCode: serverUrl + 'image/getPayQrCode',    //获取用户支付二维码
    getAllTableCode: serverUrl + 'image/getAllTableCode', //一次性获取全部桌面二维码
    uploadU: serverUrl + 'image/uploadU',              //上传头像
    uploadF: serverUrl + 'image/uploadF',              //上传餐品图片
    uploadR: serverUrl + 'image/uploadR',              //上传店铺图片
  },
  table: {
    getTables: serverUrl + 'Diningtable/getTables',     //获取商家桌台信息
    floortable: serverUrl + 'Diningtable/floortable',//获取店铺下面的楼层以及餐台
    addtable: serverUrl + 'Diningtable/addtable',//增加餐台
    deletetable: serverUrl + 'Diningtable/deltable',//删除餐台
    addfloor: serverUrl + 'Diningtable/addFloor',//增加楼层信息
    showtable: serverUrl + 'Diningtable/showtable',//查询餐台信息,没有设置餐台的楼层
    settle: serverUrl + 'Diningtable/updateStatus',//收银结算
    deleteFloor: serverUrl + 'floor/deleteFloorById',//根据楼层ID删除楼层及楼层中的餐台
  },
  restaurant: {
    getRestaurant: serverUrl + 'restaurant/getRestaurant',//顾客扫描二维码获取餐厅信息
    getAllByPage: serverUrl + 'restaurant/selectByPage',
    deleteById: serverUrl + "restaurant/deleteRestaurant",
    addRestaurant: serverUrl + 'restaurant/addRestaurant',
    getBossWithoutRestaurant: serverUrl + 'restaurant/boss/unauth', //获取所有没有开店的老板
    myRestaurant: serverUrl + 'restaurant/myRestaurant', //商户获取我的餐厅信息
    updateRestaurant: serverUrl + 'restaurant/update',   //修改店铺信息
  },
  food: {
    foodtype: serverUrl + 'food/foodListByType',//获取菜品类型
    foodorder: serverUrl + 'foodorder/insert',//插入订单记录->第四参数——餐馆id：rId；第五参数——设备id：dId
    foodList: serverUrl + 'food/selectFoodListByRID',//根据餐馆ID获取菜品信息 分页
    foodListByTId: serverUrl + 'food/selectFoodListByTID',//根据菜品ID获取菜品信息 不分页
    deleteFood: serverUrl + 'food/deleteByFoodId',//根据菜品ID 删除菜品信息
    insert: serverUrl + 'food/insert',//添加菜品
    updateFood: serverUrl + 'food/updateFoodByFoodId',//更新菜品
    changeTableStatus: serverUrl + 'foodorder/changeTableStatus',//更改餐台状态
    cashtable: serverUrl + 'foodorder/cashtable',//收银查看已开台的餐桌
    cashDetail: serverUrl + 'foodorder/cashDetail',//某张餐台的收银明细
    cashInfo: serverUrl + 'foodorder/cashInfo',//餐台点餐明细
    print: serverUrl + 'foodorder/print',//查询后厨打印的信息
    getOrderDetail: serverUrl + 'foodorder/getOrderDetail',//获取订单详情
    addfood: serverUrl + 'foodorder/addfood',//加菜
    foodOrderByRId: serverUrl + 'foodorder/selectAllByRestId',//根据餐馆ID查出订单信息
    foodOrderDetailById: serverUrl + 'foodorder/selectByOrderId',//根据订单ID查出菜品信息
    confirmOrder: serverUrl + 'foodorder/confirmOrder',//商户确认客户订单
    canceldining: serverUrl + 'foodorder/canceldining',
    addFoods: serverUrl + 'foodorder/addFoods',        //加菜处理
    delOrderFood: serverUrl + 'foodorder/delOrderFood',        //退菜：直接删除该品
    updOrderFood: serverUrl + 'foodorder/updOrderFood',        //退菜：修改数量
    report: serverUrl + 'foodorder/Report',        //报表
    getcode:serverUrl+'foodorder/cashcode',
  },
  general: {
    signUp: serverUrl + 'general/signUp' //注册新用户
  },
  user: {
    getAll: serverUrl + 'user/selectAllByPage',  //分页获取所有用户
    edit: serverUrl + 'user/update',  //修改信息
    delete: serverUrl + 'user/delete',
    resetPassword: serverUrl + 'restPassword',  //重置密码
    getAllstaff:serverUrl+'user/selectStaffByPage',
    getstaff:serverUrl+'user/selectByUserid',
    selectAllability:serverUrl+'staff/selectAllability',
    updStaff:serverUrl+'user/updateStaffInfo',
    signStaff:serverUrl+'user/signStaff',
  },
  foodType: {
    selectByRestID: serverUrl + 'foodtype/selectByRestID',//根据餐馆ID获取菜品分类
    updateByPreID: serverUrl + 'foodtype/updateByPrimaryKey',//根据主键修改餐馆信息
    insert: serverUrl + 'foodtype/insert',//添加菜品分类
  },
  aliPay:{
    barcodeBC: serverUrl + 'AlipayBarCodeBC',
    alipayH5: serverUrl + 'AlipayH5',
    testpay:payUrl,
  }
};

export const STORAGE_KEY = {
  token: 'token',
  userName: 'userName'
};
// 请求超时时间  15s 当前测试环境为1500s
export const TIME_OUT = 1500000;
